import { Application } from 'egg';

export default (app: Application) => {
    const { CHAR } = app.Sequelize;
    const model = app.model.define('Friends', {
        friends_id: { type: CHAR(32), primaryKey: true },//主键
        friends_user_id: CHAR(32),//用户id
        friends_target_user_id: CHAR(32),//好友id
        friends_relation: CHAR(1),//关系（1：普通，2：惦记）
        friends_status: CHAR(1),//状态（1：普通，2：屏蔽，3：拉黑）
        created_by: CHAR(32),
        updated_by: CHAR(32),
        is_delete: CHAR(1),
    }, { tableName: 't_friends' });
    return model;
};

export class Friends {
    friends_id: string;
    friends_user_id: string;
    friends_target_user_id: string;
    friends_relation: string;
    friends_status: string;
    created_by: string;
    updated_by: string;
    is_delete: string;
}
